
import { ref, watchEffect, watch } from 'vue'
export default function (title = '默认title') {
  const titleRef = ref(title)
  watchEffect(() => {
    document.title = titleRef.value
  })
  // watch(titleRef, (newVal) => {
  //   document.title = newVal
  // }, {
  //   immediate: true
  // })
  return titleRef
}